package cn.iocoder.yudao.module.member.dal.mysql.faceanalyserequest;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.member.dal.dataobject.faceanalyserequest.FaceanalyseRequestDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.member.controller.admin.faceanalyserequest.vo.*;

/**
 * 会员皮肤状态分析请求 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface FaceanalyseRequestMapper extends BaseMapperX<FaceanalyseRequestDO> {

    default PageResult<FaceanalyseRequestDO> selectPage(FaceanalyseRequestPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<FaceanalyseRequestDO>()
                .eqIfPresent(FaceanalyseRequestDO::getUserId, reqVO.getUserId())
                .eqIfPresent(FaceanalyseRequestDO::getApiKey, reqVO.getApiKey())
                .eqIfPresent(FaceanalyseRequestDO::getApiSecret, reqVO.getApiSecret())
                .eqIfPresent(FaceanalyseRequestDO::getRequestType, reqVO.getRequestType())
                .eqIfPresent(FaceanalyseRequestDO::getImageUrl, reqVO.getImageUrl())
                .eqIfPresent(FaceanalyseRequestDO::getLeftSideImageUrl, reqVO.getLeftSideImageUrl())
                .eqIfPresent(FaceanalyseRequestDO::getRightSideImageUrl, reqVO.getRightSideImageUrl())
                .eqIfPresent(FaceanalyseRequestDO::getReturnMaps, reqVO.getReturnMaps())
                .eqIfPresent(FaceanalyseRequestDO::getReturnMarks, reqVO.getReturnMarks())
                .eqIfPresent(FaceanalyseRequestDO::getRoiOutlineColor, reqVO.getRoiOutlineColor())
                .eqIfPresent(FaceanalyseRequestDO::getReturnSideResults, reqVO.getReturnSideResults())
                .eqIfPresent(FaceanalyseRequestDO::getMark, reqVO.getMark())
                .betweenIfPresent(FaceanalyseRequestDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(FaceanalyseRequestDO::getId));
    }

}